#ifndef __OLED_H
#define __OLED_H 



#define delay_ms(x) mDelaymS(x)
#define delay_us(x) mDelayuS(x)



//���ú�������������ʾ 0   ������ʾ
//                     90  ��ת90����ʾ
//                     180 ��ת90����ʾ
//                     270 ��ת270����ʾ

#define USE_HORIZONTAL 180   


//-----------------OLED�˿ڶ���---------------- 

#define OLED_CMD  0	//д����
#define OLED_DATA 1	//д����

void OLED_ClearPoint(uint8_t x,uint8_t y);
void OLED_ColorTurn(uint8_t i);
void OLED_WR_Byte(uint8_t dat,uint8_t mode);
void OLED_DisPlay_On(void);
void OLED_DisPlay_Off(void);
void OLED_Refresh(void);
void OLED_Clear(void);
void OLED_DrawPoint(uint8_t x,uint8_t y,uint8_t t);
void OLED_DrawLine(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2,uint8_t mode);
void OLED_DrawCircle(uint8_t x,uint8_t y,uint8_t r);
void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t size1,uint8_t mode);
void OLED_ShowChar6x8(uint8_t x,uint8_t y,uint8_t chr,uint8_t mode);
void OLED_ShowString(uint8_t x,uint8_t y,uint8_t *chr,uint8_t size1,uint8_t mode);
void OLED_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size1,uint8_t mode);
void OLED_ShowChinese(uint8_t x,uint8_t y,uint8_t num,uint8_t size1,uint8_t mode);
void OLED_ScrollDisplay(uint8_t num,uint8_t space,uint8_t mode);
void OLED_ShowPicture(uint8_t x,uint8_t y,uint8_t sizex,uint8_t sizey,uint8_t BMP[],uint8_t mode);
void OLED_Init(void);
void oled_off(void);
extern const uint8_t map_Vcan[];
void lcd_fillarea(uint16_t x,uint16_t y,uint16_t w,uint16_t h,uint8_t set);
void lcd_fillBitmap(uint16_t x,uint16_t y,uint16_t w,uint16_t h,uint8_t *Bitmap,uint8_t mode);
void lcd_disp_bat(uint8_t x,uint8_t y,uint8_t level,uint8_t charge_sts);
void lcd_disp_icon_bt(uint8_t x,uint8_t y,uint8_t sts);
void lcd_disp_icon_usb(uint8_t x,uint8_t y,uint8_t sts);

extern const uint8_t up_char[];
extern const uint8_t dn_char[];
extern const uint8_t start_char[];
extern const uint8_t stop_char[];
extern const uint8_t cancel_char[];
extern const uint8_t charge_dont[];

void OLED_Refresh(void);
void OLED_Clear(void);
void OLED_Disp_Cond_Temperature(uint16_t Target,uint16_t Current);
void OLED_Disp_Cond_Time(uint16_t Target,uint16_t Current);
void lcd_disp_big_bat(uint8_t x,uint8_t y,uint8_t level);

void refresh_ui_head(uint8_t init);

void oled_config(void);
#endif

